/**
 * 
 */
package unit;

import static org.junit.Assert.*;
import implementation.TokenStacks;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

/**
 * @author NextEpisode1
 *
 */
public class TokenStacksTest {
	private  TokenStacks ts;
	
	/**
	 * @throws java.lang.Exception
	 */
	@Before
	public void setUp() throws Exception {
		ts=new TokenStacks();
		assertNotNull(ts.getOperands());
		assertNotNull(ts.getOperators());
	}

	/**
	 * @throws java.lang.Exception
	 */
	@After
	public void tearDown() throws Exception {
		ts=null;
	}

	/**
	 * Test method for {@link implementation.TokenStacks#parseExpression(java.lang.String)}.
	 */
	@Test
	public void testParseExpression() {
		String exp = "a+b";
		ts.parseExpression(exp);
		assertEquals(ts.getOperands().get(0), "a");
		assertEquals(ts.getOperands().get(1), "b");
		assertEquals(ts.getOperators().get(1), "+");
	}
}
